VERSION 5.00
Object = "{97CECB1B-FDD6-4544-8A18-C0D4A587D4C6}#1.0#0"; "ComUnionReport.tlb"
Begin VB.Form frmComUnionBusinessIntelligenceUser 
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   6000
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   9225
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   6000
   ScaleWidth      =   9225
   ShowInTaskbar   =   0   'False
   Begin ComUnionReportCtl.BIUser BIUser1 
      Height          =   5535
      Left            =   120
      TabIndex        =   0
      Top             =   -720
      Width           =   8775
      Object.Visible         =   "True"
      Enabled         =   "True"
      ForegroundColor =   "-2147483630"
      BackgroundColor =   "16243138"
      BackColor       =   "194, 217, 247"
      Font            =   "Tahoma, 8.25pt"
      ForeColor       =   "ControlText"
      Location        =   "8, -48"
      Name            =   "BIUser"
      Size            =   "585, 369"
      Object.TabIndex        =   "0"
      Padding         =   "5, 5, 5, 5"
   End
End
Attribute VB_Name = "frmComUnionBusinessIntelligenceUser"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'IT Group Inc. 2005.09.23

Option Explicit

'Object variables


Public sBit As String

'Security Acess Level variables
Public lACNew As Boolean
Public lACEdit As Boolean
Public lACDelete As Boolean
Public lACPost As Boolean
Public lACCancel As Boolean
Public lACPrint As Boolean


'Form mode enumeration
Enum eBIMode
    Normal
    AddNewEdit
    Find
End Enum
Public Mode As eBIMode

'Set Your Object
Private Sub Form_Load()
    Set FrmName = Me
    FormSetup
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , , , , True
    BitVisible ITGLedgerMain.tbrMain
End Sub

'Activate your Toolbar Mode
Private Sub Form_Activate()
    TBBitReload
    Call CreateNetworkMapping
End Sub

Private Sub Form_Resize()
    'BIUser1.Top = 0
    'BIUser1.Left = 0
    BIUser1.Width = Me.Width
    BIUser1.Height = Me.Height
End Sub

'Release your Object
Private Sub Form_Unload(Cancel As Integer)
On Error Resume Next
   
    CloseMenuTab ITGLedgerMain
    
    BitEnabled ITGLedgerMain, Me, ITGLedgerMain.tbrMain, , , , , , , , , , True
    BitVisible ITGLedgerMain.tbrMain
    Call RemoveNetworkMapping
    Set frmComUnionBusinessIntelligenceUser = Nothing

    lCloseWindow = True
    frmToolContainer.WindowState = 2
    
End Sub

'Close active window
Public Sub TBCloseWindow()
    Unload Me
End Sub

'Reload menu buttons (do not delete this sub)
Public Sub TBBitReload()
    BitVisible ITGLedgerMain.tbrMain
    BitReload ITGLedgerMain, Me, ITGLedgerMain.tbrMain, sBit
    Set FrmName = Me
End Sub


Private Sub CreateNetworkMapping()
On Error Resume Next
Dim a As WshNetwork
Set a = New WshNetwork

Call RemoveNetworkMapping

a.MapNetworkDrive NM_LocalName, NM_RemoteName, False, NM_UserName, NM_Password

'If err.Number <> 0 Then
'    MsgBox err.Number & " " & err.Description, vbCritical, "Comunion"
'    SetUpContainer Me, Me.Tag, False 'ITGLedgerMain.mnuFileClose_Click 'TBCloseWindow
'End If
Set a = Nothing ' clean up
End Sub

Private Sub RemoveNetworkMapping()
On Error Resume Next
Dim a As WshNetwork
Set a = New WshNetwork

a.RemoveNetworkDrive NM_LocalName, True, True
err.Number = 0
Set a = Nothing ' clean up
End Sub
